package com.mrjy.maintain.dao;

import java.util.List;
import java.util.Map;

import com.mrjy.common.entity.DistributorTeamInfo;
import com.mrjy.common.entity.ServiceStationInfo;
import com.mrjy.maintain.dto.ServerStationDTO;
import com.mrjy.maintain.dto.ServiceStationParamDTO;

public interface IServiceStationInfoDao {

	//根据id查询
	ServiceStationInfo queryById(int id);
	
	//根据属性查询
	List<ServiceStationInfo> queryStationInfo(ServiceStationInfo serviceStationInfo);
	
	//分页查询服务站
	List<ServiceStationInfo> queryPageStation(ServiceStationInfo serviceStationInfo);
	
	//统计服务站总数
	int countStation(ServiceStationInfo serviceStationInfo);
	
	//插入服务站
	int insert(ServiceStationInfo serviceStationInfo);
	
	//批量插入服务站
	int insertBatch(List<ServiceStationInfo> serviceStationInfos);
	
	//根据id更新服务站信息
	int updateById(ServiceStationInfo serviceStationInfo);
	
	//批量启用、禁用服务站信息
	int updateDisableFlag(ServiceStationInfo serviceStationInfo);
	//批量删除
	int deleteByIds(int[] ids);

	ServiceStationInfo selectByMobilePhone(String stationMobilePhone);
		
	ServiceStationInfo isStationByRecommendIdAndCompleteTime(Map<String,Object> map);
	
	ServiceStationInfo isStationTeamByRecommendIdAndCompleteTime(Map<String,Object> map);
	
	List<Integer> selectStationIdByRecommendCode(Map<String,Object> map);

	List<ServiceStationInfo> txCheckStationInfoStatusExpired();
	
	ServiceStationInfo queryByUserId(Integer userId);

	ServiceStationInfo queryByTeamMemberUserId(Integer userId);
	
	//根据服务站id查询其团队成员
	List<DistributorTeamInfo> queryTeamByStationId(ServiceStationInfo serviceStationInfo);
	
	ServiceStationInfo queryByMobliePhone(String stationMobilePhone);
	
	List<ServerStationDTO> queryStationPage(ServiceStationParamDTO dto);
	int queryCountStationPage(ServiceStationParamDTO dto);
	
	int txAddCallingNumById(Integer id);
}
